#!/usr/local/bin/python

# example usage - ./test.py *.wav or python test.py *.wav
from pycdp import *

if __name__ == "__main__":  # python convention, but i think you can leave it out...
    mono = cdp.housekeep.chans(4)
    norm = cdp.modify.loudness(3)

    scrub = cdp.modify.radical(3)
    scrub.l = -48
    scrub.h = 24
    scrub.dur = 2

    scrub2 = cdp.modify.radical(3)
    scrub2.l = -12
    scrub2.h = 24
    scrub2.dur = 2

    reverse = cdp.modify.radical(1)

    rev = cdp.modify.revecho(3)

    rev2 = cdp.modify.revecho(3)
    rev2.s = 0.2
    rev2.r = 0.5
    rev2.e = 500

    chain = []
    chain.append(mono)
#    chain.append(scrub)
    chain.append(rev)
#    chain.append(scrub2)
    chain.append(rev2)
    chain.append(reverse)
    chain.append(norm)

    output_files = cdp.run_chain(chain, sys.argv[1:], False)

    print(output_files) # debug!
